
package com.joysuch.wwyt.datadump.biz.query;

import cn.zlg.common.datadump.condition.QueryCondtionDef;
import cn.zlg.common.datadump.condition.QueryFieldCondition;
import cn.zlg.common.datadump.condition.SortFieldDef;
import com.joysuch.wwyt.bp.entity.contractor.dsl.QBpContractor;
import com.querydsl.core.types.Order;

public class BpContractorDumpQueryBean implements QueryCondtionDef {

    @Override
    public QueryFieldCondition[] getAllConditionDef() {
        return new QueryFieldCondition[] {
                new QueryFieldCondition("ids", QBpContractor.bpContractor, QBpContractor.bpContractor.id,
                        QBpContractor.bpContractor.id, "in"),
                new QueryFieldCondition("name", QBpContractor.bpContractor, QBpContractor.bpContractor.companyName,
                        QBpContractor.bpContractor.id, "contains"),
                new QueryFieldCondition("contractorType", QBpContractor.bpContractor, QBpContractor.bpContractor.contractorType,
                        QBpContractor.bpContractor.id, "eq"),
                new QueryFieldCondition("state", QBpContractor.bpContractor, QBpContractor.bpContractor.state,
                        QBpContractor.bpContractor.id, "eq"), };
    }

    @Override
    public SortFieldDef[] getAllSortFieldDef() {
        return new SortFieldDef[] { new SortFieldDef(QBpContractor.bpContractor.companyName, "name", Order.ASC) };
    }
}
